YUI.add('ads-v2',function(Y){"use strict";var instances=nfl.ads.instances=nfl.ads.instances||{},Ads=Y.namespace('NFL.Ads'),Constants=nfl.constants,ATTRS={id:{value:null,writeOnce:true,getter:function(val){return val||Y.guid();}},type:{value:'adi'},path:{value:null,getter:'_getPath'},tile:{value:Y.Object.keys(instances).length+1},dcopt:{value:''},width:{value:0},height:{value:0},aamnfl:{value:'',getter:function(){return(Y.Cookie.exists('aamnfl'))?Y.Cookie.get('aamnfl'):''}},aam_did:{value:'',getter:function(){return(Y.Cookie.exists('aam_did'))?Y.Cookie.get('aam_did'):''}},size:{readOnly:true,getter:function(){return[this.get("width"),this.get("height")].join("x");}},html:{value:""}};Ads.Ad=Y.Base.create("ad",Y.Widget,[],{_addAdAttrs:function(value,key){if(!ATTRS.hasOwnProperty(key)){this.addAttr(key,{value:value});}},initializer:function(config){var id=this.get("id");Y.Object.each(config||{},this._addAdAttrs,this);if(Y.Object.size(instances)===0){this.set("dcopt",';dcopt=ist');}
instances[id]=this;this.set("tile",Y.Object.keys(instances).length);},_getPath:function(value){if(value.indexOf('{ord}')>-1){return Y.substitute(value,{ord:Constants.AD_RANDOM});}
return value+';ord='+Constants.AD_RANDOM+'?';},renderUI:function(){var content=this.get('html'),bbox=this.get('boundingBox');if(content){this.get("contentBox").setContent(content);}},getURLParams:function(){console.log("getURLParams()",this.get("path"),this.getAttrs());return Y.Lang.sub(this.get('path'),this.getAttrs());},syncUI:function(){var html=this.get("html"),iframe,adURL;if(html){this._uiRenderCompanion(this.get("contentBox"),html);}else{adURL=this.getURLParams();iframe=this.iframe=Y.Node.create('<iframe src="'+adURL+'" frameborder="0" scrolling="no" width="'+this.get('width')+'" height="'+this.get('height')+'" allowtransparency="true"></iframe>');this.get("contentBox").setContent(iframe);}},_uiRenderCompanion:function(div,html){var doc=Y.config.doc,contentWindow="contentWindow",documentS="document",iframe,page,iframeNode,domainSrc,d;if(!html){return;}
page='<!DOCTYPE html><html><head><meta charset="utf-8"><title></title></head><body style="margin:0;padding:0">'+html+'</body></html>';iframeNode=Y.Node.create("<iframe frameborder=\"0\" allowtransparency=\"true\" scrolling=\"no\" />");iframeNode.setStyles({width:"100%",height:"100%",verticalAlign:"bottom"});div.empty().append(iframeNode);iframe=iframeNode.getDOMNode();try{iframe[contentWindow][documentS].open();}catch(e){domainSrc="javascript:var d="+documentS+".open();d.domain='"+doc.domain+"';";iframe.src=domainSrc+"void(0);";}
try{d=iframe[contentWindow][documentS];d.write(page);d.close();}catch(e2){iframe.src=domainSrc+'d.write("'+html.replace(/"/g,'\\"')+'");d.close();';}},destructor:function(){delete instances[this.get("id")];}},{NAME:'ad',ATTRS:ATTRS});Ads.create=function(config){return new Ads.Ad(config);};Ads.resetOrd=function(){Constants.AD_RANDOM=Math.random()*10000000000000000;};},"3.4.1",{requires:['base-build','widget-base','substitute','cookie']});;YUI.add('nfl-omniture',function(Y){var GlobalEnv=YUI.namespace('Env.NFLOmnitureTracking'),CLICK='click',body,OmnitureTracking,YObject=Y.Object,YLang=Y.Lang,CLICK_NAME_ATTRIBUTE='data-clickname';OmnitureTracking=Y.Base.create('nfl-omniture',Y.Base,[],{linkTrackVars:function(name,obj){OmnitureTracking.linkTrackVars(name,obj);}},{CLICK_NAME_ATTRIBUTE:CLICK_NAME_ATTRIBUTE,linkTrackVars:function(n,o){console.log('linkTrackVars()',n,o);var keys=[],values=[],name=n,obj=o,ltv=s_analytics.linkTrackVars;if(YLang.isObject(n)){obj=name;name='';}
if(s_analytics){YObject.each(obj,function(value,key){s_analytics[key]=value;keys.push(key);values.push(value);});s_analytics.linkTrackVars=keys.join(',');s_analytics.tl(true,'o',name||values.join(','));s_analytics.linkTrackVars=ltv;YObject.each(obj,function(value,key){s_analytics[key]='';});}},trackLinkVars:function(value){this.trackLink(true,'o',value,{prop35:value});},trackLink:function(d,t,n,o){console.log('trackLink()',o);if(Y.Lang.isObject(o)){o.linkTrackVars=Y.Object.keys(o).join(',');if(o.events){o.linkTrackEvents=o.events;}}
if(s_analytics){s_analytics.tl(d,t,n,o);}},trackPageLoad:function(o){console.log('trackPageLoad()',o);if(Y.Lang.isObject(o)){o.linkTrackVars=Y.Object.keys(o).join(',');if(o.events){o.linkTrackEvents=o.events;}}
if(s_analytics){s_analytics.t(o);}},getS:function(){return Y.config.win.s||s_analytics;},getInstance:function(){Y.error('Y.NFL.OmnitureTracking is now a static class, no need to call getInstance()');return new OmnitureTracking();}});if(!GlobalEnv.initialized){GlobalEnv.initialized=true;body=Y.one(Y.config.doc.body);GlobalEnv.clickNameHandler=Y.delegate(CLICK,function(event){if(event.button!==1){return;}
OmnitureTracking.linkTrackVars({prop35:event.currentTarget.getAttribute(CLICK_NAME_ATTRIBUTE)});event._nflOmnitureTracked=true;},body,'['+CLICK_NAME_ATTRIBUTE+']');GlobalEnv.externalClickHandler=Y.delegate(CLICK,function(event){var link=event.currentTarget,m,attrs={},keys=["pos","id","module"];if(event._nflOmnitureTracked||event.button!==1||event._event.returnValue===false){return;}
m=link.get("href").match(/(?:\?|&)module=([^#&]+)/);if(m){attrs.module=m[1];m=link.getAttribute("name").match(/&l(id|pos)=([^&]+)&l(id|pos)=([^&]+)/);if(m){attrs[m[1]]=m[2];attrs[m[3]]=m[4];}}else{Y.Array.each(keys,function(key){var attr="data-tracking-"+key,el=link.ancestor("["+attr+"]",true);if(el){attrs[key]=el.getAttribute(attr);}});}
if(Y.Object.keys(attrs).length===keys.length){s_analytics.c_w('SC_NFLLINKS',[attrs.id,attrs.pos,attrs.module].join("|"));}},body,'a[href]');Y.on('unload',function(){GlobalEnv.clickNameHandler.detach();GlobalEnv.externalClickHandler.detach();});}
Y.namespace('NFL').OmnitureTracking=OmnitureTracking;},"3.3.0",{requires:['base','node','event-delegate']});